Package com.fsf.news.utils
Class TextUtilsTest
java.lang.Object
com.fsf.news.utils.TextUtilsTest
Tests for the TextUtils class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Stream<org.junit.jupiter.params.provider.Arguments> Provides test data for the testCleanAndTokenizeWords method.(package private) voidtestCleanAndTokenizeWords(String input, List<String> expected) Tests the cleanAndTokenizeWords method with various inputs.(package private) static Stream<org.junit.jupiter.params.provider.Arguments> Provides test data for the testCountSentences method.(package private) voidtestCountSentences(String input, long expected) Tests the countSentences method with various inputs.(package private) static Stream<org.junit.jupiter.params.provider.Arguments> Provides test data for the testCountSyllables method.(package private) voidtestCountSyllables(String input, long expected) Tests the countSyllables method with various inputs.(package private) static Stream<org.junit.jupiter.params.provider.Arguments> Provides test data for the testCountWords method.(package private) voidtestCountWords(String input, long expected) Tests the countWords method with various inputs.
-
Constructor Details
-
TextUtilsTest
TextUtilsTest()
-
-
Method Details
-
testCleanAndTokenizeWords
@ParameterizedTest @MethodSource void testCleanAndTokenizeWords(String input, List<String> expected) Tests the cleanAndTokenizeWords method with various inputs.- Parameters:
input- the input stringexpected- the expected list of words
-
testCleanAndTokenizeWords
Provides test data for the testCleanAndTokenizeWords method.- Returns:
- A stream of test data
-
testCountSyllables
Tests the countSyllables method with various inputs.- Parameters:
input- the input stringexpected- the expected syllable count
-
testCountSyllables
Provides test data for the testCountSyllables method.- Returns:
- A stream of test data
-
testCountWords
Tests the countWords method with various inputs.- Parameters:
input- the input stringexpected- the expected word count
-
testCountWords
Provides test data for the testCountWords method.- Returns:
- A stream of test data
-
testCountSentences
Tests the countSentences method with various inputs.- Parameters:
input- the input stringexpected- the expected sentence count
-
testCountSentences
Provides test data for the testCountSentences method.- Returns:
- A stream of test data
-